package com.ruoyi.project.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.project.domain.FinRecordVoucherItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 凭证项Mapper接口
 *
 * @author abel
 * @date 2024-10-15
 */
public interface FinRecordVoucherItemMapper extends BaseMapper<FinRecordVoucherItem>
{

    /**
     * 查询凭证项列表
     *
     * @param finRecordVoucherItem 凭证项
     * @return 凭证项集合
     */
    List<FinRecordVoucherItem> selectFinRecordVoucherItemList(FinRecordVoucherItem finRecordVoucherItem);

    /**
     * 删除凭证项
     *
     * @param id 凭证项ID
     * @return 结果
     */
    public int deleteFinRecordVoucherItemById(Long id);

    /**
     * 批量删除凭证项
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteFinRecordVoucherItemByIds(Long[] ids);

    @Delete("delete from fin_record_voucher_item where record_id=#{recordId}")
    int deleteByRecordId(@Param("recordId") Long recordId);

    @Select("select *  from fin_record_voucher_item where record_id=#{recordId}")
    List<FinRecordVoucherItem> listByRecordId(@Param("recordId") Long recordId);
}
